package com.hl.hospital.controller;

import com.hl.hospital.config.Constants;
import com.hl.hospital.dao.*;
import com.hl.hospital.entity.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hl
 * @Date: 2021/06/23/11:27
 */
@Controller
public class CWController {
    @Autowired
    private CwFormtlMapper cwFormtlMapper;
    @Autowired
    private CwHzwjsfyQfTzMapper cwHzwjsfyQfTzMapper;
    @Autowired
    private CwMzfymxMapper cwMzfymxMapper;
    @Autowired
    private CwMzfyxxMapper cwMzfyxxMapper;
    @Autowired
    private CwMzghjfjlBakMapper cwMzghjfjlBakMapper;
    @Autowired
    private CwMzghjfjlMapper cwMzghjfjlMapper;
    @Autowired
    private CwtjXsMapper cwtjXsMapper;
    @Autowired
    private CwYbsfqkMapper cwYbsfqkMapper;
    @Autowired
    private CwZyfyjsxxMapper cwZyfyjsxxMapper;
    @Autowired
    private CwZyfymxMapper cwZyfymxMapper;
    @Autowired
    private CwZyfyxxBfMapper cwZyfyxxBfMapper;
    @Autowired
    private CwZyfyxxMapper cwZyfyxxMapper;
    @Autowired
    private CwZyyjjMapper cwZyyjjMapper;


    @RequestMapping("cwformtl")
    public String cwformtl(Model model)
    {
        List<CwFormtl> cwFormtls = cwFormtlMapper.selectAll();
        model.addAttribute(Constants.CWFORMTL,cwFormtls);
        return "cwformtl";
    }

    @RequestMapping("cwhzwjsfyqftz")
    public String cwHzwjsfyQfTz(Model model){
        List<CwHzwjsfyQfTz> cwHzwjsfyQfTzs=cwHzwjsfyQfTzMapper.selectAll();
        model.addAttribute(Constants.CWHZWJSFYQFTZ,cwHzwjsfyQfTzs);
        return "cwhzwjsfyqftz";
    }

    @RequestMapping("cwmzfymx")
    public String cwMzfymx(Model model){
        List<CwMzfymx> cwMzfymxes=cwMzfymxMapper.selectAll();
        model.addAttribute(Constants.CWMZFYMX,cwMzfymxes);
        return "cwmzfymx";
    }

    @RequestMapping("cwmzfyxx")
    public String cwMzfyxx(Model model){
        List<CwMzfyxx> cwMzfyxxes=cwMzfyxxMapper.selectAll();
        model.addAttribute(Constants.CWMZFYXX,cwMzfyxxes);
        return "cwmzfyxx";
    }

    @RequestMapping("cwmzghjfjl")
    public String cwMzghjfjl(Model model){
        List<CwMzghjfjl> cwMzghjfjls=cwMzghjfjlMapper.selectAll();
        model.addAttribute(Constants.CWMZGHJFJL,cwMzghjfjls);
        return "cwmzghjfjl";
    }

    @RequestMapping("cwmzghjfjlbak")
    public String cwMzghjfjlBak(Model model){
        List<CwMzghjfjlBak> cwMzghjfjlBaks=cwMzghjfjlBakMapper.selectAll();
        model.addAttribute(Constants.CWMZGHJFJLBAK,cwMzghjfjlBaks);
        return "cwmzghjfjlbak";
    }




    @RequestMapping("cwybsfqk")
    public String ybsfqk (Model model)
    {
        List<CwYbsfqk> ybsfqks = cwYbsfqkMapper.selectAll();
        model.addAttribute(Constants.CWYBSFQK,ybsfqks);
        return "cwybsfqk";
    }
    @RequestMapping("cwzyfyjsxx")
    public String zyfyjsxx (Model model){
        List<CwZyfyjsxx> zyfyjsxxs = cwZyfyjsxxMapper.selectAll();
        model.addAttribute(Constants.CWZYFYJSXX,zyfyjsxxs);
        return "cwzyfyjsxx";
    }
    @RequestMapping("cwzyfymx")
    public String zyfymx (Model model){
        List<CwZyfymx> zyfymxs = cwZyfymxMapper.selectAll();
        model.addAttribute(Constants.CWZYFYMX,zyfymxs);
        return "cwzyfymx";
    }
    @RequestMapping("cwzyfyxx")
    public String zyfyxx (Model model){
        List<CwZyfyxx> zyfyxxs = cwZyfyxxMapper.selectAll();
        model.addAttribute(Constants.CWZYFYXX,zyfyxxs);
        return "cwzyfyxx";
    }
    @RequestMapping("cwzyfyxxbf")
    public String zyfyxxbf (Model model){
        List<CwZyfyxxBf> zyfyxxBfs = cwZyfyxxBfMapper.selectAll();
        model.addAttribute(Constants.CWZYFYXXBF,zyfyxxBfs);
        return "cwzyfyxxbf";
    }
    @RequestMapping("cwzyyjj")
    public String zyyjj (Model model){
        List<CwZyyjj>  zyyjjs= cwZyyjjMapper.selectAll();
        model.addAttribute(Constants.CWZYYJJ,zyyjjs);
        return "cwzyyjj";
    }

}
